(global.webpackJsonp = global.webpackJsonp || []).push([ [ "subpages/pages/tickets/tickets" ], {
    "292a": function(t, o, i) {},
    "3c45": function(t, o, i) {
        (function(t) {
            i("98af"), e(i("66fd"));
            var o = e(i("b47a"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(o.default);
        }).call(this, i("543d").createPage);
    },
    "65ec": function(t, o, i) {
        i.r(o);
        var e = i("6d8a"), n = i.n(e);
        for (var a in e) "default" !== a && function(t) {
            i.d(o, t, function() {
                return e[t];
            });
        }(a);
        o.default = n.a;
    },
    "6d8a": function(t, o, i) {
        (function(t) {
            Object.defineProperty(o, "__esModule", {
                value: !0
            }), o.default = void 0;
            var i = {
                data: function() {
                    return {
                        payload: {
                            content: "",
                            username: "",
                            phone: "",
                            logisticID: "",
                            type: ""
                        },
                        imgUrl: [],
                        max: 3,
                        typeArr: [],
                        index: 0,
                        history: []
                    };
                },
                onLoad: function(t) {
                    t.logisticID && (this.payload.logisticID = t.logisticID), t.name && (this.payload.username = t.name), 
                    t.phone && (this.payload.phone = t.phone), this.getTickets(), this.getTicketsType();
                },
                methods: {
                    remove: function(t) {
                        this.imgUrl = this.imgUrl.filter(function(o, i) {
                            return i !== t;
                        });
                    },
                    upload: function() {
                        var t = this;
                        this.$api.uploadImage(this.max - this.imgUrl.length, function(o) {
                            "1" == o.code ? t.imgUrl.push(o.data) : t.$common.errorToShow(o.msg);
                        });
                    },
                    bindPickerChange: function(t) {
                        this.index = t.target.value, this.payload.type = this.typeArr[this.index];
                    },
                    submit: function() {
                        var o = this, i = this.payload, e = i.content, n = void 0 === e ? "" : e, a = i.username, r = void 0 === a ? "" : a, s = i.phone, c = void 0 === s ? "" : s, u = i.logisticID, l = void 0 === u ? "" : u, d = i.type, h = void 0 === d ? "" : d;
                        if ("" !== n) if (n.length < 10) this.$common.errorToShow("问题描述不少于10个字"); else if ("" !== r) if ("" !== c) if ("" !== l) if ("" !== h) {
                            this.payload.user_id = this.$db.get("userInfo").id;
                            var f = JSON.parse(JSON.stringify(this.payload));
                            this.imgUrl.length > 0 && (f.images = JSON.stringify(this.imgUrl)), this.$api.addticketsApi(f, function(i) {
                                "1" == i.code ? (o.payload = {
                                    content: "",
                                    username: "",
                                    phone: "",
                                    logisticID: "",
                                    type: ""
                                }, o.imgUrl = [], o.$common.successToShow(i.msg, function() {
                                    t.navigateBack();
                                })) : o.$common.errorToShow(i.msg);
                            });
                        } else this.$common.errorToShow("请选择工单类型"); else this.$common.errorToShow("渠道单号不得为空"); else this.$common.errorToShow("联系电话不得为空"); else this.$common.errorToShow("联系人不得为空"); else this.$common.errorToShow("问题描述不得为空");
                    },
                    getTickets: function() {
                        var t = this, o = this.payload.logisticID, i = this.$db.get("userInfo").id;
                        this.$api.getticketsApi({
                            logisticID: o,
                            user_id: i
                        }, function(o) {
                            "1" == o.code ? t.history = o.data || [] : t.$common.errorToShow(o.msg);
                        });
                    },
                    getTicketsType: function() {
                        var t = this;
                        this.$api.getTicketsTypeApi({}, function(o) {
                            "1" == o.code ? t.typeArr = o.data || [] : t.$common.errorToShow(o.msg);
                        });
                    }
                }
            };
            o.default = i;
        }).call(this, i("543d").default);
    },
    "7fc1": function(t, o, i) {
        i.d(o, "b", function() {
            return e;
        }), i.d(o, "c", function() {
            return n;
        }), i.d(o, "a", function() {});
        var e = function() {
            this.$createElement, this._self._c;
        }, n = [];
    },
    b47a: function(t, o, i) {
        i.r(o);
        var e = i("7fc1"), n = i("65ec");
        for (var a in n) "default" !== a && function(t) {
            i.d(o, t, function() {
                return n[t];
            });
        }(a);
        i("c353");
        var r = i("f0c5"), s = Object(r.a)(n.default, e.b, e.c, !1, null, "c156487e", null, !1, e.a, void 0);
        o.default = s.exports;
    },
    c353: function(t, o, i) {
        var e = i("292a");
        i.n(e).a;
    }
}, [ [ "3c45", "common/runtime", "common/vendor" ] ] ]);